package com.nalai.market.v1.controller;


import com.nalai.market.v1.model.User;
import com.nalai.market.v1.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author com.nalai
 * @since 2021-08-24
 */
@RestController
@RequestMapping("/v1/user")
public class UserController {

    @Autowired
    private IUserService userService;
    @PostMapping("/userLogin")
    public int userLogin(User user, String rem, HttpServletResponse response, HttpSession session){
        System.out.println("来登录了?老弟");
        return userService.userLogin(user,rem,response,session);
    }


}
